package com.lesson3.singleton;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/8/27 11:03
 */
public class Type4
{
    public static void main(String[] args)
    {
        Singleton6 instance = Singleton6.INSTANCE;
        Singleton6 instance1 = Singleton6.INSTANCE;
        System.out.println(instance.hashCode()==instance1.hashCode());
    }
}

enum Singleton6{
    INSTANCE;

    public void say(){
        System.out.println("ok");
    }
}
